package cn.assumejson.springframework.aop.bean;

import cn.assumejson.springframework.beans.factory.annotation.Autowired;
import cn.assumejson.springframework.beans.factory.annotation.Value;
import cn.assumejson.springframework.context.stereotype.Component;
import cn.hutool.core.lang.Console;

/**
 * @author Mr. Li
 * @version 1.0
 * @since 1.0 2021/12/3 23:47
 */
@Component
public class OrderService {

    @Value("${orderSn}")
    private String orderSn;

    @Autowired
    private UserService userService;

    public void printOrderSn() {
        System.out.println(userService.register("小刚仔"));
        Console.log("orderSn:{}", orderSn);
    }

    @Autowired
    public void autowiredTest() {
        Console.log("autowiredTest:{}", orderSn);
    }

}
